import config from '@/config'
import http from '@/utils/request'

export default {
	token: {
		url: `${config.API_URL}/login/login`,
		name: '登录获取TOKEN',
		post: async function (data = {}) {
			// eslint-disable-next-line no-return-await
			return await http.post(this.url, data)
		}
	},

	menu: {
		url: `${config.API_URL}/auth/menu`,
		name: '获取我的菜单',
		get: async function () {
			// eslint-disable-next-line no-return-await
			return await http.get(this.url)
		}
	}
}
